<template>
  <div class="order">
    <div class="headerhh">
      <div @click="goBack" style="float: left; height: 0.98rem;">
        <a-icon type="left" class="icon"/>
        <a class="h3">健康宣教</a>
      </div>
    </div>
    <healthinfo :dpId='dpId' :healthList='healthList'></healthinfo>
  </div>
</template>

<script>
import urls from '../../common.js'
import healthinfo from './healthInfo'
export default {
  name: 'headerhh',
  data () {
    return {
      dpId: '',
      healthList: []
    }
  },
  components: {
    healthinfo
  },
  created () {
    this.getHealth()
    this.dpId = this.$route.query.dpId
  },
  methods: {
    goBack () {
      this.$router.push('/')
    },
    getHealth () { // 科室宣教
      const Qs = require('qs')
      var _this = this
      this.$http.post(urls.getHealth, Qs.stringify({ 'dpId': this.$route.query.dpId }),
        {
          headers: {
            'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'
          }
        }
      ).then(result => {
        if (result.body.code === '200') {
          console.log(result.body.data)
          _this.healthList = result.body.data
          // result.body.data.map((res) => {
          //   console.log(res.content)
          //   this.contentList.push(res.content)
          // })
          // console.log(this.contentList)
        }
      })
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '../../../static/css/color.styl';

.order {
  position: relative;
  background-color: $color-grayc;
  height: 100%;
}

.headerhh {
  height: 0.98rem;
  background-color: $color-main;
  text-align: justify;
  line-height: 0.98rem;
  padding-left: 0.3rem;
  color: $color-white;

  .icon {
    font-size: 0.36rem;
    color: $color-white;
    // vertical-align: -0.23rem;
    vertical-align: -0.06rem;
  }

  .h3 {
    display: inline-block;
    font-size: 0.36rem;
    color: $color-white;
  }

  .chargeback {
    height: 100%;
    float: right;
    line-height: 1rem;
    font-size: 0.32rem;
    margin-right: 0.4rem;

    .icon {
      width: 0.25rem;
      height: 0.3rem;
      background: url('../../../static/images/Order2/message1.png') no-repeat;
      background-size: 100%;
      margin-top: 0.37rem;
      margin-right: 0.15rem;
      float: left;
    }

    .span {
      color: $color-white;
      font-weight: normal;
    }

    .time {
      margin-left: 0.6rem;
      color: $color-orderone;
    }
  }
}

.anticon {
  font-size: 0.26rem;
  vertical-align: -0.23em;
}
</style>
